package com.sdkj.service.law;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sdkj.dao.DaoSupport;
import com.sdkj.entity.Page;
import com.sdkj.util.PageData;



@Service("lawProtocolService")
public class LawProtocolService {
	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	/*
	 * 列表
	 */
	public List<PageData> list(Page page)throws Exception {
		return (List<PageData>) dao.findForList("LawProtocolMapper.datalistPage", page);
	}
	/*
	 * 保存
	 */
	public void save(PageData pd)throws Exception {
		dao.save("LawProtocolMapper.save", pd);
	}
	/*
	 * ID查找
	 */
	public PageData findById(PageData pd)throws Exception {
		return (PageData) dao.findForObject("LawProtocolMapper.findById", pd);
	}
	
	/*
	 * 修改
	 */
	public void edit(PageData pd)throws Exception {
		dao.update("LawProtocolMapper.edit", pd);
		
	}
	
	/*
	 * 修改
	 */
	public void update(PageData pd)throws Exception {
		dao.update("LawProtocolMapper.update", pd);
		
	}
	/*
	 * 批量修改
	 */
	public void updateAll(String[] arrayDATA_IDS)throws Exception {
		dao.update("LawProtocolMapper.updateALL", arrayDATA_IDS);
		
	}
	/*
	 * 列表全部
	 */
	public List<PageData> listAll(PageData pd)throws Exception {
		return (List<PageData>) dao.findForList("LawProtocolMapper.listAll", pd);
	}
	
	
	
	
	
}
